﻿using System;
using System.Data;
using System.Text;
using System.Data.OracleClient;
using DBUtility;//Please add references
namespace TierApplication
{
	/// <summary>
	/// 类T_PRODUCT。
	/// </summary>
	[Serializable]
public partial class T_PRODUCT
	{
		public T_PRODUCT()
		{}
		#region Model
		private string _productid;
		private string _productname;
		private string _schoolid;
		private string _bandwidth;
		private string _lifetime;
		private decimal? _purchaseprice;
		private decimal? _marketprice;
		private decimal? _discount;
		private decimal? _discountprice;
		private decimal? _unitprice;
		private string _productimage;
		private string _categoryid;
		private string _descn;
		private string _remark;
		private string _remark1;
		private string _remark2;
		private DateTime? _createdate= DateTime.Now;
		private string _lastalteruserid;
		private DateTime? _lastaltertime;
		private decimal? _point;
		/// <summary>
		/// 商品编号
		/// </summary>
		public string PRODUCTID
		{
			set{ _productid=value;}
			get{return _productid;}
		}
		/// <summary>
		/// 商品名称
		/// </summary>
		public string PRODUCTNAME
		{
			set{ _productname=value;}
			get{return _productname;}
		}
		/// <summary>
		/// 学校
		/// </summary>
		public string SCHOOLID
		{
			set{ _schoolid=value;}
			get{return _schoolid;}
		}
		/// <summary>
		/// 带宽 C_Bandwidth
		/// </summary>
		public string BANDWIDTH
		{
			set{ _bandwidth=value;}
			get{return _bandwidth;}
		}
		/// <summary>
		/// 使用期限
		/// </summary>
		public string LIFETIME
		{
			set{ _lifetime=value;}
			get{return _lifetime;}
		}
		/// <summary>
		/// 进价
		/// </summary>
		public decimal? PURCHASEPRICE
		{
			set{ _purchaseprice=value;}
			get{return _purchaseprice;}
		}
		/// <summary>
		/// 市场价 
		/// </summary>
		public decimal? MARKETPRICE
		{
			set{ _marketprice=value;}
			get{return _marketprice;}
		}
		/// <summary>
		/// 折扣（%）
		/// </summary>
		public decimal? DISCOUNT
		{
			set{ _discount=value;}
			get{return _discount;}
		}
		/// <summary>
		/// 折扣价 =市场价*(1-折扣%)
		/// </summary>
		public decimal? DISCOUNTPRICE
		{
			set{ _discountprice=value;}
			get{return _discountprice;}
		}
		/// <summary>
		/// 销售单价 =市场价*折扣%
		/// </summary>
		public decimal? UNITPRICE
		{
			set{ _unitprice=value;}
			get{return _unitprice;}
		}
		/// <summary>
		/// 商品图片路径
		/// </summary>
		public string PRODUCTIMAGE
		{
			set{ _productimage=value;}
			get{return _productimage;}
		}
		/// <summary>
		/// 商品类别(预留字段 C_CategoryID1、  上网充值卡2、  移动充值卡3、  联通充值卡)

		/// </summary>
		public string CATEGORYID
		{
			set{ _categoryid=value;}
			get{return _categoryid;}
		}
		/// <summary>
		/// 商品说明
		/// </summary>
		public string DESCN
		{
			set{ _descn=value;}
			get{return _descn;}
		}
		/// <summary>
		/// 商品备注
		/// </summary>
		public string REMARK
		{
			set{ _remark=value;}
			get{return _remark;}
		}
		/// <summary>
		/// 商品备注1
		/// </summary>
		public string REMARK1
		{
			set{ _remark1=value;}
			get{return _remark1;}
		}
		/// <summary>
		/// 商品备注2
		/// </summary>
		public string REMARK2
		{
			set{ _remark2=value;}
			get{return _remark2;}
		}
		/// <summary>
		/// 创建日期 默认值SysDate
		/// </summary>
		public DateTime? CREATEDATE
		{
			set{ _createdate=value;}
			get{return _createdate;}
		}
		/// <summary>
		/// 最后修改人
		/// </summary>
		public string LASTALTERUSERID
		{
			set{ _lastalteruserid=value;}
			get{return _lastalteruserid;}
		}
		/// <summary>
		/// 最后修改时间
		/// </summary>
		public DateTime? LASTALTERTIME
		{
			set{ _lastaltertime=value;}
			get{return _lastaltertime;}
		}
		/// <summary>
		/// 积分
		/// </summary>
		public decimal? POINT
		{
			set{ _point=value;}
			get{return _point;}
		}
		#endregion Model


		#region  Method

		/// <summary>
		/// 得到一个对象实体
		/// </summary>
		public T_PRODUCT(string sPRODUCTID)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select PRODUCTID,PRODUCTNAME,SCHOOLID,BANDWIDTH,LIFETIME,PURCHASEPRICE,MARKETPRICE,DISCOUNT,DISCOUNTPRICE,UNITPRICE,PRODUCTIMAGE,CATEGORYID,DESCN,REMARK,REMARK1,REMARK2,CREATEDATE,LASTALTERUSERID,LASTALTERTIME,POINT ");
			strSql.Append(" FROM T_PRODUCT ");
			strSql.Append(" where PRODUCTID=:PRODUCTID ");
			OracleParameter[] parameters = {
					new OracleParameter(":PRODUCTID", OracleType.VarChar,50)};
			parameters[0].Value = sPRODUCTID;

			DataSet ds=DbHelperOra.Query(strSql.ToString(),parameters);
			if(ds.Tables[0].Rows.Count>0)
			{
				if(ds.Tables[0].Rows[0]["PRODUCTID"]!=null && ds.Tables[0].Rows[0]["PRODUCTID"].ToString()!="")
				{
					this.PRODUCTID=ds.Tables[0].Rows[0]["PRODUCTID"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PRODUCTNAME"]!=null && ds.Tables[0].Rows[0]["PRODUCTNAME"].ToString()!="")
				{
					this.PRODUCTNAME=ds.Tables[0].Rows[0]["PRODUCTNAME"].ToString();
				}
				if(ds.Tables[0].Rows[0]["SCHOOLID"]!=null && ds.Tables[0].Rows[0]["SCHOOLID"].ToString()!="")
				{
					this.SCHOOLID=ds.Tables[0].Rows[0]["SCHOOLID"].ToString();
				}
				if(ds.Tables[0].Rows[0]["BANDWIDTH"]!=null && ds.Tables[0].Rows[0]["BANDWIDTH"].ToString()!="")
				{
					this.BANDWIDTH=ds.Tables[0].Rows[0]["BANDWIDTH"].ToString();
				}
				if(ds.Tables[0].Rows[0]["LIFETIME"]!=null && ds.Tables[0].Rows[0]["LIFETIME"].ToString()!="")
				{
					this.LIFETIME=ds.Tables[0].Rows[0]["LIFETIME"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PURCHASEPRICE"]!=null && ds.Tables[0].Rows[0]["PURCHASEPRICE"].ToString()!="")
				{
					this.PURCHASEPRICE=decimal.Parse(ds.Tables[0].Rows[0]["PURCHASEPRICE"].ToString());
				}
				if(ds.Tables[0].Rows[0]["MARKETPRICE"]!=null && ds.Tables[0].Rows[0]["MARKETPRICE"].ToString()!="")
				{
					this.MARKETPRICE=decimal.Parse(ds.Tables[0].Rows[0]["MARKETPRICE"].ToString());
				}
				if(ds.Tables[0].Rows[0]["DISCOUNT"]!=null && ds.Tables[0].Rows[0]["DISCOUNT"].ToString()!="")
				{
					this.DISCOUNT=decimal.Parse(ds.Tables[0].Rows[0]["DISCOUNT"].ToString());
				}
				if(ds.Tables[0].Rows[0]["DISCOUNTPRICE"]!=null && ds.Tables[0].Rows[0]["DISCOUNTPRICE"].ToString()!="")
				{
					this.DISCOUNTPRICE=decimal.Parse(ds.Tables[0].Rows[0]["DISCOUNTPRICE"].ToString());
				}
				if(ds.Tables[0].Rows[0]["UNITPRICE"]!=null && ds.Tables[0].Rows[0]["UNITPRICE"].ToString()!="")
				{
					this.UNITPRICE=decimal.Parse(ds.Tables[0].Rows[0]["UNITPRICE"].ToString());
				}
				if(ds.Tables[0].Rows[0]["PRODUCTIMAGE"]!=null && ds.Tables[0].Rows[0]["PRODUCTIMAGE"].ToString()!="")
				{
					this.PRODUCTIMAGE=ds.Tables[0].Rows[0]["PRODUCTIMAGE"].ToString();
				}
				if(ds.Tables[0].Rows[0]["CATEGORYID"]!=null && ds.Tables[0].Rows[0]["CATEGORYID"].ToString()!="")
				{
					this.CATEGORYID=ds.Tables[0].Rows[0]["CATEGORYID"].ToString();
				}
				if(ds.Tables[0].Rows[0]["DESCN"]!=null && ds.Tables[0].Rows[0]["DESCN"].ToString()!="")
				{
					this.DESCN=ds.Tables[0].Rows[0]["DESCN"].ToString();
				}
				if(ds.Tables[0].Rows[0]["REMARK"]!=null && ds.Tables[0].Rows[0]["REMARK"].ToString()!="")
				{
					this.REMARK=ds.Tables[0].Rows[0]["REMARK"].ToString();
				}
				if(ds.Tables[0].Rows[0]["REMARK1"]!=null && ds.Tables[0].Rows[0]["REMARK1"].ToString()!="")
				{
					this.REMARK1=ds.Tables[0].Rows[0]["REMARK1"].ToString();
				}
				if(ds.Tables[0].Rows[0]["REMARK2"]!=null && ds.Tables[0].Rows[0]["REMARK2"].ToString()!="")
				{
					this.REMARK2=ds.Tables[0].Rows[0]["REMARK2"].ToString();
				}
				if(ds.Tables[0].Rows[0]["CREATEDATE"]!=null && ds.Tables[0].Rows[0]["CREATEDATE"].ToString()!="")
				{
					this.CREATEDATE=DateTime.Parse(ds.Tables[0].Rows[0]["CREATEDATE"].ToString());
				}
				if(ds.Tables[0].Rows[0]["LASTALTERUSERID"]!=null && ds.Tables[0].Rows[0]["LASTALTERUSERID"].ToString()!="")
				{
					this.LASTALTERUSERID=ds.Tables[0].Rows[0]["LASTALTERUSERID"].ToString();
				}
				if(ds.Tables[0].Rows[0]["LASTALTERTIME"]!=null && ds.Tables[0].Rows[0]["LASTALTERTIME"].ToString()!="")
				{
					this.LASTALTERTIME=DateTime.Parse(ds.Tables[0].Rows[0]["LASTALTERTIME"].ToString());
				}
				if(ds.Tables[0].Rows[0]["POINT"]!=null && ds.Tables[0].Rows[0]["POINT"].ToString()!="")
				{
					this.POINT=decimal.Parse(ds.Tables[0].Rows[0]["POINT"].ToString());
				}
			}
		}

		/// <summary>
		/// 是否存在该记录
		/// </summary>
		public bool Exists(string PRODUCTID)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select count(1) from T_PRODUCT");
			strSql.Append(" where PRODUCTID=:PRODUCTID ");

			OracleParameter[] parameters = {
					new OracleParameter(":PRODUCTID", OracleType.VarChar,50)};
			parameters[0].Value = PRODUCTID;

			return DbHelperOra.Exists(strSql.ToString(),parameters);
		}


		/// <summary>
		/// 增加一条数据
		/// </summary>
		public void Add()
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("insert into T_PRODUCT (");
			strSql.Append("PRODUCTID,PRODUCTNAME,SCHOOLID,BANDWIDTH,LIFETIME,PURCHASEPRICE,MARKETPRICE,DISCOUNT,DISCOUNTPRICE,UNITPRICE,PRODUCTIMAGE,CATEGORYID,DESCN,REMARK,REMARK1,REMARK2,CREATEDATE,LASTALTERUSERID,LASTALTERTIME,POINT)");
			strSql.Append(" values (");
			strSql.Append(":PRODUCTID,:PRODUCTNAME,:SCHOOLID,:BANDWIDTH,:LIFETIME,:PURCHASEPRICE,:MARKETPRICE,:DISCOUNT,:DISCOUNTPRICE,:UNITPRICE,:PRODUCTIMAGE,:CATEGORYID,:DESCN,:REMARK,:REMARK1,:REMARK2,:CREATEDATE,:LASTALTERUSERID,:LASTALTERTIME,:POINT)");
			OracleParameter[] parameters = {
					new OracleParameter(":PRODUCTID", OracleType.VarChar,20),
					new OracleParameter(":PRODUCTNAME", OracleType.VarChar,100),
					new OracleParameter(":SCHOOLID", OracleType.VarChar,20),
					new OracleParameter(":BANDWIDTH", OracleType.VarChar,1),
					new OracleParameter(":LIFETIME", OracleType.VarChar,6),
					new OracleParameter(":PURCHASEPRICE", OracleType.Number,12),
					new OracleParameter(":MARKETPRICE", OracleType.Number,12),
					new OracleParameter(":DISCOUNT", OracleType.Number,12),
					new OracleParameter(":DISCOUNTPRICE", OracleType.Number,12),
					new OracleParameter(":UNITPRICE", OracleType.Number,12),
					new OracleParameter(":PRODUCTIMAGE", OracleType.VarChar,100),
					new OracleParameter(":CATEGORYID", OracleType.VarChar,6),
					new OracleParameter(":DESCN", OracleType.VarChar,4000),
					new OracleParameter(":REMARK", OracleType.VarChar,200),
					new OracleParameter(":REMARK1", OracleType.VarChar,200),
					new OracleParameter(":REMARK2", OracleType.VarChar,200),
					new OracleParameter(":CREATEDATE", OracleType.DateTime),
					new OracleParameter(":LASTALTERUSERID", OracleType.VarChar,20),
					new OracleParameter(":LASTALTERTIME", OracleType.DateTime),
					new OracleParameter(":POINT", OracleType.Number,10)};
			parameters[0].Value = PRODUCTID;
			parameters[1].Value = PRODUCTNAME;
			parameters[2].Value = SCHOOLID;
			parameters[3].Value = BANDWIDTH;
			parameters[4].Value = LIFETIME;
			parameters[5].Value = PURCHASEPRICE;
			parameters[6].Value = MARKETPRICE;
			parameters[7].Value = DISCOUNT;
			parameters[8].Value = DISCOUNTPRICE;
			parameters[9].Value = UNITPRICE;
			parameters[10].Value = PRODUCTIMAGE;
			parameters[11].Value = CATEGORYID;
			parameters[12].Value = DESCN;
			parameters[13].Value = REMARK;
			parameters[14].Value = REMARK1;
			parameters[15].Value = REMARK2;
			parameters[16].Value = CREATEDATE;
			parameters[17].Value = LASTALTERUSERID;
			parameters[18].Value = LASTALTERTIME;
			parameters[19].Value = POINT;

			DbHelperOra.ExecuteSql(strSql.ToString(),parameters);
		}
		/// <summary>
		/// 更新一条数据
		/// </summary>
		public bool Update()
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("update T_PRODUCT set ");
			strSql.Append("PRODUCTNAME=:PRODUCTNAME,");
			strSql.Append("SCHOOLID=:SCHOOLID,");
			strSql.Append("BANDWIDTH=:BANDWIDTH,");
			strSql.Append("LIFETIME=:LIFETIME,");
			strSql.Append("PURCHASEPRICE=:PURCHASEPRICE,");
			strSql.Append("MARKETPRICE=:MARKETPRICE,");
			strSql.Append("DISCOUNT=:DISCOUNT,");
			strSql.Append("DISCOUNTPRICE=:DISCOUNTPRICE,");
			strSql.Append("UNITPRICE=:UNITPRICE,");
			strSql.Append("PRODUCTIMAGE=:PRODUCTIMAGE,");
			strSql.Append("CATEGORYID=:CATEGORYID,");
			strSql.Append("DESCN=:DESCN,");
			strSql.Append("REMARK=:REMARK,");
			strSql.Append("REMARK1=:REMARK1,");
			strSql.Append("REMARK2=:REMARK2,");
			strSql.Append("CREATEDATE=:CREATEDATE,");
			strSql.Append("LASTALTERUSERID=:LASTALTERUSERID,");
			strSql.Append("LASTALTERTIME=:LASTALTERTIME,");
			strSql.Append("POINT=:POINT");
			strSql.Append(" where PRODUCTID=:PRODUCTID ");
			OracleParameter[] parameters = {
					new OracleParameter(":PRODUCTNAME", OracleType.VarChar,100),
					new OracleParameter(":SCHOOLID", OracleType.VarChar,20),
					new OracleParameter(":BANDWIDTH", OracleType.VarChar,1),
					new OracleParameter(":LIFETIME", OracleType.VarChar,6),
					new OracleParameter(":PURCHASEPRICE", OracleType.Number,12),
					new OracleParameter(":MARKETPRICE", OracleType.Number,12),
					new OracleParameter(":DISCOUNT", OracleType.Number,12),
					new OracleParameter(":DISCOUNTPRICE", OracleType.Number,12),
					new OracleParameter(":UNITPRICE", OracleType.Number,12),
					new OracleParameter(":PRODUCTIMAGE", OracleType.VarChar,100),
					new OracleParameter(":CATEGORYID", OracleType.VarChar,6),
					new OracleParameter(":DESCN", OracleType.VarChar,4000),
					new OracleParameter(":REMARK", OracleType.VarChar,200),
					new OracleParameter(":REMARK1", OracleType.VarChar,200),
					new OracleParameter(":REMARK2", OracleType.VarChar,200),
					new OracleParameter(":CREATEDATE", OracleType.DateTime),
					new OracleParameter(":LASTALTERUSERID", OracleType.VarChar,20),
					new OracleParameter(":LASTALTERTIME", OracleType.DateTime),
					new OracleParameter(":POINT", OracleType.Number,10),
					new OracleParameter(":PRODUCTID", OracleType.VarChar,20)};
			parameters[0].Value = PRODUCTNAME;
			parameters[1].Value = SCHOOLID;
			parameters[2].Value = BANDWIDTH;
			parameters[3].Value = LIFETIME;
			parameters[4].Value = PURCHASEPRICE;
			parameters[5].Value = MARKETPRICE;
			parameters[6].Value = DISCOUNT;
			parameters[7].Value = DISCOUNTPRICE;
			parameters[8].Value = UNITPRICE;
			parameters[9].Value = PRODUCTIMAGE;
			parameters[10].Value = CATEGORYID;
			parameters[11].Value = DESCN;
			parameters[12].Value = REMARK;
			parameters[13].Value = REMARK1;
			parameters[14].Value = REMARK2;
			parameters[15].Value = CREATEDATE;
			parameters[16].Value = LASTALTERUSERID;
			parameters[17].Value = LASTALTERTIME;
			parameters[18].Value = POINT;
			parameters[19].Value = PRODUCTID;

			int rows=DbHelperOra.ExecuteSql(strSql.ToString(),parameters);
			if (rows > 0)
			{
				return true;
			}
			else
			{
				return false;
			}
		}

		/// <summary>
		/// 删除一条数据
		/// </summary>
		public bool Delete(string PRODUCTID)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("delete from T_PRODUCT ");
			strSql.Append(" where PRODUCTID=:PRODUCTID ");
			OracleParameter[] parameters = {
					new OracleParameter(":PRODUCTID", OracleType.VarChar,50)};
			parameters[0].Value = PRODUCTID;

			int rows=DbHelperOra.ExecuteSql(strSql.ToString(),parameters);
			if (rows > 0)
			{
				return true;
			}
			else
			{
				return false;
			}
		}


		/// <summary>
		/// 得到一个对象实体
		/// </summary>
		public void GetModel(string sPRODUCTID)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select PRODUCTID,PRODUCTNAME,SCHOOLID,BANDWIDTH,LIFETIME,PURCHASEPRICE,MARKETPRICE,DISCOUNT,DISCOUNTPRICE,UNITPRICE,PRODUCTIMAGE,CATEGORYID,DESCN,REMARK,REMARK1,REMARK2,CREATEDATE,LASTALTERUSERID,LASTALTERTIME,POINT ");
			strSql.Append(" FROM T_PRODUCT ");
			strSql.Append(" where PRODUCTID=:PRODUCTID ");
			OracleParameter[] parameters = {
					new OracleParameter(":PRODUCTID", OracleType.VarChar,50)};
			parameters[0].Value = sPRODUCTID;

			DataSet ds=DbHelperOra.Query(strSql.ToString(),parameters);
			if(ds.Tables[0].Rows.Count>0)
			{
				if(ds.Tables[0].Rows[0]["PRODUCTID"]!=null && ds.Tables[0].Rows[0]["PRODUCTID"].ToString()!="")
				{
					this.PRODUCTID=ds.Tables[0].Rows[0]["PRODUCTID"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PRODUCTNAME"]!=null && ds.Tables[0].Rows[0]["PRODUCTNAME"].ToString()!="")
				{
					this.PRODUCTNAME=ds.Tables[0].Rows[0]["PRODUCTNAME"].ToString();
				}
				if(ds.Tables[0].Rows[0]["SCHOOLID"]!=null && ds.Tables[0].Rows[0]["SCHOOLID"].ToString()!="")
				{
					this.SCHOOLID=ds.Tables[0].Rows[0]["SCHOOLID"].ToString();
				}
				if(ds.Tables[0].Rows[0]["BANDWIDTH"]!=null && ds.Tables[0].Rows[0]["BANDWIDTH"].ToString()!="")
				{
					this.BANDWIDTH=ds.Tables[0].Rows[0]["BANDWIDTH"].ToString();
				}
				if(ds.Tables[0].Rows[0]["LIFETIME"]!=null && ds.Tables[0].Rows[0]["LIFETIME"].ToString()!="")
				{
					this.LIFETIME=ds.Tables[0].Rows[0]["LIFETIME"].ToString();
				}
				if(ds.Tables[0].Rows[0]["PURCHASEPRICE"]!=null && ds.Tables[0].Rows[0]["PURCHASEPRICE"].ToString()!="")
				{
					this.PURCHASEPRICE=decimal.Parse(ds.Tables[0].Rows[0]["PURCHASEPRICE"].ToString());
				}
				if(ds.Tables[0].Rows[0]["MARKETPRICE"]!=null && ds.Tables[0].Rows[0]["MARKETPRICE"].ToString()!="")
				{
					this.MARKETPRICE=decimal.Parse(ds.Tables[0].Rows[0]["MARKETPRICE"].ToString());
				}
				if(ds.Tables[0].Rows[0]["DISCOUNT"]!=null && ds.Tables[0].Rows[0]["DISCOUNT"].ToString()!="")
				{
					this.DISCOUNT=decimal.Parse(ds.Tables[0].Rows[0]["DISCOUNT"].ToString());
				}
				if(ds.Tables[0].Rows[0]["DISCOUNTPRICE"]!=null && ds.Tables[0].Rows[0]["DISCOUNTPRICE"].ToString()!="")
				{
					this.DISCOUNTPRICE=decimal.Parse(ds.Tables[0].Rows[0]["DISCOUNTPRICE"].ToString());
				}
				if(ds.Tables[0].Rows[0]["UNITPRICE"]!=null && ds.Tables[0].Rows[0]["UNITPRICE"].ToString()!="")
				{
					this.UNITPRICE=decimal.Parse(ds.Tables[0].Rows[0]["UNITPRICE"].ToString());
				}
				if(ds.Tables[0].Rows[0]["PRODUCTIMAGE"]!=null && ds.Tables[0].Rows[0]["PRODUCTIMAGE"].ToString()!="")
				{
					this.PRODUCTIMAGE=ds.Tables[0].Rows[0]["PRODUCTIMAGE"].ToString();
				}
				if(ds.Tables[0].Rows[0]["CATEGORYID"]!=null && ds.Tables[0].Rows[0]["CATEGORYID"].ToString()!="")
				{
					this.CATEGORYID=ds.Tables[0].Rows[0]["CATEGORYID"].ToString();
				}
				if(ds.Tables[0].Rows[0]["DESCN"]!=null && ds.Tables[0].Rows[0]["DESCN"].ToString()!="")
				{
					this.DESCN=ds.Tables[0].Rows[0]["DESCN"].ToString();
				}
				if(ds.Tables[0].Rows[0]["REMARK"]!=null && ds.Tables[0].Rows[0]["REMARK"].ToString()!="")
				{
					this.REMARK=ds.Tables[0].Rows[0]["REMARK"].ToString();
				}
				if(ds.Tables[0].Rows[0]["REMARK1"]!=null && ds.Tables[0].Rows[0]["REMARK1"].ToString()!="")
				{
					this.REMARK1=ds.Tables[0].Rows[0]["REMARK1"].ToString();
				}
				if(ds.Tables[0].Rows[0]["REMARK2"]!=null && ds.Tables[0].Rows[0]["REMARK2"].ToString()!="")
				{
					this.REMARK2=ds.Tables[0].Rows[0]["REMARK2"].ToString();
				}
				if(ds.Tables[0].Rows[0]["CREATEDATE"]!=null && ds.Tables[0].Rows[0]["CREATEDATE"].ToString()!="")
				{
					this.CREATEDATE=DateTime.Parse(ds.Tables[0].Rows[0]["CREATEDATE"].ToString());
				}
				if(ds.Tables[0].Rows[0]["LASTALTERUSERID"]!=null && ds.Tables[0].Rows[0]["LASTALTERUSERID"].ToString()!="")
				{
					this.LASTALTERUSERID=ds.Tables[0].Rows[0]["LASTALTERUSERID"].ToString();
				}
				if(ds.Tables[0].Rows[0]["LASTALTERTIME"]!=null && ds.Tables[0].Rows[0]["LASTALTERTIME"].ToString()!="")
				{
					this.LASTALTERTIME=DateTime.Parse(ds.Tables[0].Rows[0]["LASTALTERTIME"].ToString());
				}
				if(ds.Tables[0].Rows[0]["POINT"]!=null && ds.Tables[0].Rows[0]["POINT"].ToString()!="")
				{
					this.POINT=decimal.Parse(ds.Tables[0].Rows[0]["POINT"].ToString());
				}
			}
		}

		/// <summary>
		/// 获得数据列表
		/// </summary>
		public DataSet GetList(string strWhere)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select * ");
			strSql.Append(" FROM T_PRODUCT ");
			if(strWhere.Trim()!="")
			{
				strSql.Append(" where "+strWhere);
			}
			return DbHelperOra.Query(strSql.ToString());
		}

		#endregion  Method
	}
}

